import { Button, ErrorBlock, Space } from 'antd-mobile';
import { useNavigate } from 'react-router';

const NotFound = () => {
  const navigate = useNavigate();
  return (
    <>
      <ErrorBlock title="你要访问的页面不见了" description="换个页面试试..." fullPage>
        <Space>
          <Button color="primary" onClick={() => navigate('/')}>
            返回首页
          </Button>
          <Button color="warning" onClick={() => navigate(-1)}>
            后退一步
          </Button>
        </Space>
      </ErrorBlock>
    </>
  );
};

export default NotFound;
